package com.example.easyexcel.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;

@Getter
@Setter
@EqualsAndHashCode
public class IndexData {
    @ExcelProperty(value = "字符串标题", index = 0)
    private String string;
    @ExcelProperty(value = "日期标题", index = 1)
    private Date date;
    /**
     * 这里设置3 会导致第二列空的
     */
    @ExcelProperty(value = "数字标题", index = 3)
    private Double doubleData;
}

// 指定写入的列，参考 https://easyexcel.opensource.alibaba.com/docs/current/quickstart/write#%E6%8C%87%E5%AE%9A%E5%86%99%E5%85%A5%E7%9A%84%E5%88%97